#include <stdio.h>

#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))

int main()
{
    int a, b, c, nCase;
    scanf("%d", &nCase);
    while (nCase--)
    {
        scanf("%d%d%d", &a, &b, &c);
        printf("%d %.2lf %d %d %d\n", a + b + c, (a + b + c) / 3.0,
                a * b * c, MIN(MIN(a, b), c), MAX(MAX(a, b), c));
    }
    return 0;
}
